package customerEnter.Frame.JDBCDao.UseQuery;

import org.springframework.jdbc.support.rowset.SqlRowSet;

import customerEnter.Frame.DaoDataTransmission.DaoFramePameTransmission;
import customerEnter.Frame.JDBCDao.Interface.DaoFrameUseTypeInterface;
import customerEnter.Frame.Utils.Log4j;

/**
 * string 數據的查詢
 * 
 * 
 * 类名称：DaoFrameUseTypeStringImpl 类描述： 创建人：dy 创建时间：2017-4-13 下午2:27:20
 * 
 */
public class DaoFrameUseTypeStringImpl implements DaoFrameUseTypeInterface<String> {

	@Override
	public <T, K> String useDaoFrameDataType(DaoFramePameTransmission<T, K> daoFramePameTransmission) {
		String string = "";
		try {
			SqlRowSet sqlRowSet = daoFramePameTransmission.sqlRowSet;
			// ResultSet sqlRowSet = daoFramePameTransmission.getRs();
			while (sqlRowSet.next()) {
				string = sqlRowSet.getString(1);
				break;
			}
		} catch (Exception e) {
			Log4j.setLog4j(getClass());
			Log4j.Log4JOutError("返回string 出錯:" + e.getMessage());
		}

		return string;
	}

}
